<%-- 
    Document   : 登录记录查询
    Created on : 2014-08-20, 15：52：24
    Author     : zhouruxuan
--%>

<%@page contentType="text/html; charset=UTF-8" session="false" %>
<%@include  file="/WEB-INF/jspf/import.jspf"%>
<div class="pageHeader">
    <form onsubmit="return navTabSearch(this);" pagerFormId="loginHistoryList-pagerForm" id="pagerForm" name="searchForm" method="get">
        <input type="hidden" name="pageNum" value="${pager.pageNo}" />
        <input type="hidden" name="pageSize" value="${pager.pageSize}" />
        <input type="hidden" name="orderField" value="${orderField}" />
        <input type="hidden" name="orderDirection" value="${orderDirection}" />
        <div class="searchBar">
            <table class="searchContent">
                <tbody>
                    <tr>
                        <td><label>用户ID：</label><input type="text" name="userId" id="userId" value="${userId}" class="textInput"></td>
                        <td><label>登录时间：</label>
                            <input type="text" value="${loginDateFrom}" datefmt="yyyy-MM-dd 00:00:00" name="loginDateFrom" id="loginDateFrom" class="date" readonly="true">
                          	  至
                            <input type="text" value="${loginDateTo}" datefmt="yyyy-MM-dd 23:59:59" name="loginDateTo" id="loginDateTo" class="date" readonly="true">
                        </td>
                    </tr>
                </tbody>
            </table>
            <div class="subBar">
                <ul>
                    <li><div class="buttonActive"><div class="buttonContent"><button type="submit">查询</button></div></div></li>
                    <li><div class="buttonActive"><div class="buttonContent"><button type="button" onClick="resetF();">重置</button></div></div></li>
                </ul>
            </div>
        </div>
    </form>
</div>
<div class="pageContent">
    <table class="table" style="width: 100%" layoutH="163">
        <thead>
            <tr>
                <th width="5%">用户ID</th>
                <th width="6%">调用终端</th>
                <th width="6%">登录时间</th>
            </tr>
        </thead>
        <tbody>
            <c:forEach var="e" items="${pager.resultList}">
                <tr>
                    <td>${e.userId}</td>
                    <td>${e.client}</td>
                    <td><fmt:formatDate value="${e.loginDateTime}" type="both"/></td>
                </tr>
            </c:forEach>
        </tbody>
    </table>

</div>
<div class="panelBar">
    <div class="pages">
        <span>共 ${pager.total} 条</span>
    </div>
    <div class="pagination" targetType="navTab" totalCount="${pager.total}" numPerPage="${pager.pageSize}" pageNumShown="10" currentPage="${pager.pageNo}"></div>
</div>
<script type="text/javascript">
	//清空查询条件，方便二次查询
	function resetF() {
		//清空查询条件
		$("#userId").val("");
		$("#loginDateFrom").val("");
		$("#loginDateTo").val("");
		//重新提交表单
		$("#pagerForm[pagerFormId=loginHistoryList]").submit();
	}
</script>
